<template>
	<view class="detail_out">
		
		<view class="img_top" >
			
			<u--image :showLoading="true" :src="detail.room_img" 
			
			width="500upx" height="300upx" @click="click"></u--image>
			
			
		</view>
		
		<view class="list_body">
			<view class="list_item">
				<view class="label">
					<text>房间号:</text>
					
				</view>
				<view class="txt">
					{{detail.roomnum}}
					
				</view>
			</view>
			
			<view class="list_item">
				
				
				<view class="label">
					<text>房间类型:</text>
				</view>
				<view class="txt">
					{{detail.room_type}}
				</view>
			</view>
			
			<view class="list_item">
				<view class="label">
					<text >房间价格:</text>
				</view>
				<view class="txt" style="color: red;">
					￥ {{detail.room_price}}
				</view>
			</view>
			
			<view class="list_item">
				<view class="label">
					<text>房间状态:</text>
				</view>
				<view class="txt">
					
					<u-tag  v-if="detail.roomstate==0?true:false" plain style="width: 80rpx;text-align: center;" size="mini" text="空房" type="success"></u-tag>
					<u-tag  v-if="detail.roomstate==1?true:false" plain style="width: 110rpx;text-align: center;" size="mini" text="已预约"></u-tag>
					
					<u-tag v-if="detail.roomstate==2?true:false" plain style="width: 100rpx;text-align: center;" size="mini" text="已入住" type="error"></u-tag>
					
					
				</view>
			</view>
			
		</view>
		
		
	</view>
</template>

<script>
	import { Request2 } from '@/until/api.js';
	export default {
		onLoad(e){
			if(e.data){
				this.detail=JSON.parse(e.data)
			}
			
		},
		data() {
			return {
				detail:""
				}
				}
				}
</script>

<style lang="scss" scoped >
	.detail_out{
		padding: 20upx;
		background: #eeeeee;
		min-height: 100vh;
		overflow: hidden;
		.img_top{
			width: 500upx;
			height: 300upx;
			margin: 30upx auto;
		}
		.list_body{
			margin-top: 25upx;
			.list_item{
				background-color: #fff;
				padding:30upx 20upx;
				color: #000;
				border-radius: 10upx;
				font-size: 38upx;
				margin: 30upx 0;
				display: flex;
				.label{
					min-width: 200upx;
					text-align: center;
					padding: 10upx;
					background-color: #21c495;
				}
				.txt{
					margin-left: 25upx;
					padding: 10upx;
				}
			}
		}
	}
</style>